<template>
  <div>
    <el-form
      ref="ChangeNameFormRef"
      :rules="changeNameRules"
      :model="changeNameForms"
      :label-position="labelPosition"
      label-width="100px"
    >
      <el-row>
        <el-col :span="24"
          ><div class="grid-content bg-purple">
            <el-form-item label="客户名称" class="u-ipt" prop="custName">
              <el-input
                placeholder=""
                v-model="changeNameForms.custName"
                class="input-with-select"
                :disabled="
                  data.flag === 'changeName' || isDisabled ? false : true
                "
              >
              </el-input>
            </el-form-item></div
        ></el-col>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="证件类型" prop="certType">
              <el-select
                v-model="changeNameForms.certType"
                placeholder="请选择"
                class="u-select-box"
                :disabled="data.flag === 'changeName' || isDisabled ? false : true"
                @change="changeNameCustNumberTypeChange"
              >
                <el-option
                  v-for="item in selectInfo[1].val"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                >
                </el-option>
              </el-select>
            </el-form-item></div
        ></el-col>
        <el-col :span="24"
          ><div class="grid-content bg-purple">
            <el-form-item
              label="证件号码"
              class="u-ipt"
              prop="certNum"
              :required="changeNameForms.certType === '7' ? false : true"
            >
              <el-input
                placeholder=""
                v-model="changeNameForms.certNum"
                class="input-with-select"
                :disabled="data.flag === 'changeName' || isDisabled ? false : true"
              >
              </el-input>
            </el-form-item></div
        ></el-col>
        <el-col :span="24"
          ><div class="grid-content bg-purple">
            <el-form-item label="审核人:" prop="auditor" v-if="isAuditIdShow">
              <dic-customer-select
                :value="changeNameForms.auditor"
                title="审核人"
                ref="auditIdRef"
                size="50%"
                @inLoadAjax="auditIdAjax"
              >
                <!-- 表单 -->
                <el-form
                  :inline="false"
                  label-width="100px"
                  :model="changeNameAuditIdForm"
                  ref="auditIdFormRef"
                >
                  <el-row :gutter="10">
                    <el-col :span="10">
                      <div class="grid-content bg-purple">
                        <el-form-item label="员工编码" class="u-ipt">
                          <el-input
                            placeholder=""
                            v-model="changeNameAuditIdForm.staffCode"
                            class="input-with-select"
                          >
                          </el-input>
                        </el-form-item>
                      </div>
                    </el-col>
                    <el-col :span="10">
                      <div class="grid-content bg-purple">
                        <el-form-item label="员工姓名" class="u-ipt">
                          <el-input
                            placeholder="请输入内容"
                            v-model="changeNameAuditIdForm.staffName"
                            class="input-with-select"
                          >
                          </el-input>
                        </el-form-item>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <el-button
                        type="primary"
                        size="small"
                        @click="auditIdQuery"
                        >查询</el-button
                      >
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="审核人姓名">
                        {{ changeNameAuditIdForm.staffNameChoose }}
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>

                <DicTable
                  ref="commonRegionTable"
                  stripe
                  highlight-current-row
                  :columnData="auditIdColumns"
                  :tableData="auditIdTableData"
                  :loading="auditIdTableLoading"
                  :currentPage="auditIdTablePage.pageIndex"
                  :pageSize="auditIdTablePage.pageSize"
                  :totalResult="auditIdTablePage.rowCount"
                  :pager="true"
                  @current-change="auditIdCurrentChangeEvent"
                  @on-page-change="auditIdHandlePageChange"
                >
                </DicTable>
                <div class="text-c" style="text-align:center">
                  <el-button
                    type="primary"
                    size="small"
                    @click="sunmitAuditIdHandel"
                    >确定</el-button
                  >
                </div>
              </dic-customer-select>
            </el-form-item>
          </div></el-col
        >
        <el-col :span="24"
          ><div class="grid-content bg-purple">
            <el-form-item
              label="证件地址"
              class="u-ipt"
              prop="certAddr"
              :required="changeNameForms.certType === '7' ? false : true"
            >
              <el-input
                type="textarea"
                :rows="2"
                placeholder="请输入内容"
                v-model="changeNameForms.certAddr"
                class="input-with-select"
                :disabled="
                  data.flag === 'changeName' || isDisabled ? false : true
                "
              >
              </el-input>
            </el-form-item></div
        ></el-col>
        <el-col :span="24"
          ><div class="grid-content bg-purple">
            <el-form-item
              label="行业类型"
              class="u-ipt"
              prop="industryTypeName"
              v-if="industryTypeNameIsShow"
            >
              <dic-customer-select
                :value="changeNameForms.industryTypeName"
                title="请选择行业类型"
                ref="changeNameIndustyRef"
                size="50%"
                @inLoadAjax="changeNameindustryCdAjax"
              >
                <el-tag slot="btnSlot" class="u-tabgs-btn">行业类型</el-tag>

                <div class="m-tree-box">
                  <vxe-grid
                    border
                    size="medium"
                    max-height="500"
                    :tree-config="changeNameindustryTableTreeConfig"
                    resizable
                    ref="xGrid"
                    :data="changeNameindustryTableData"
                    :columns="changeNameindustryTableColumn"
                    @cell-dblclick="changeNameCellDBLClickEvent"
                  >
                  </vxe-grid>
                </div>
              </dic-customer-select>
            </el-form-item></div
        ></el-col>
        <el-col :span="24"
          ><div class="grid-content bg-purple">
            <el-form-item
              label="证件复印件照片"
              prop="photoPath"
              :required="changeNameForms.certType === '7' ? true : false"
            >
              <el-upload
                :action="uploadUrl"
                list-type="picture-card"
                :show-file-list="true"
                :file-list="changeNameList"
                :data="changeNamephoData"
                :multiple="false"
                accept=".jpg,.jpeg,.png,.JPG,.JPEG"
                :on-change="changeNameChange"
                :on-preview="changeNamePreview"
                :on-success="changeNameSuccess"
                :before-upload="changeNameUpload"
              >
                <!-- <img v-if="copyIdPhoto.photoPath" :src="copyIdPhoto.photoPath" class="avatar"> -->
                <i class="el-icon-plus"></i>
              </el-upload>
              <el-dialog :visible.sync="changeNameDialogVisible" append-to-body>
                <img width="100%" :src="changeNameDialogImageUrl" alt="" />
              </el-dialog>
            </el-form-item></div
        ></el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancelHandel">取 消</el-button>
      <el-button type="primary" @click="submitChangeForm">确 定</el-button>
    </div>
    <el-dialog
      title="提示"
      :visible.sync="onComplianceVisible"
      width="70%"
      :close-on-click-modal="false"
      append-to-body
    >
      <span>
        <el-alert
          :title="alertTitle"
          type="warning"
          :closable="false"
          class="mb20"
        >
        </el-alert>

        <DicTable
          stripe
          v-show="DicTableIsShow"
          :columnData="nonComplianceviewTableColumns"
          :tableData="nonComplianceviewTableData"
        >
          <template #opt="{ row }">
            <el-button type="primary" @click="changeRow(row)">选择</el-button>
          </template>
        </DicTable>
        <el-alert
          v-if="titleMsgIsshow"
          :title="titleMsg"
          type="warning"
          :closable="false"
          class="mt20"
        >
        </el-alert>
      </span>

      <span slot="footer" class="dialog-footer">
        <el-button @click="onComplianceVisible = false">关闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import CustomerInfoManageServer from "@/api/customer/CustomerInfoManageServer";
import DicCustomerSelect from "@/components/customer/form/DicCustomerSelect";
import DicTable from "@/components/public/DicTable";
import validRules from "@/views/customer/valide/gaoyjValidRules.js";
import { mapState } from "vuex";
export default {
  name: "Compliance",
  props: {
    isShow: {
      type: Boolean,
      default: false,
    },
    data: {
      type: Object,
      default() {
        return {};
      },
    },
    partyId: {
      type: String,
      default() {
        return "";
      },
    },
    custId: {
      type: String,
      default() {
        return "";
      },
    },
    rules: {
      type: Object,
      default() {
        return {};
      },
    },
  },

  data() {
    return {
      labelPosition: "left",
      selectInfo: [
        {
          flag: "control_type", //直管类型
          val: [],
        },
        {
          flag: "cert_type", //改名改证件直管类型
          val: [],
        },
      ],
      //客户列表-改名该证件-证件照片上传-放大-弹窗的显示隐藏
      changeNameDialogVisible: false,
      //客户列表-改名该证件-证件照片上传-放大-弹窗内的照片的路径
      changeNameDialogImageUrl: "",
      changeNamephoData: {
        partyId: "",
        fileFlag: "party",
        oldPhotoPath: "",
      },
      uploadUrl: `${process.env.VUE_APP_CTX_CUST}/saveCustFile`,
      isAuditIdShow: false,
      //  改名改证件
      changeNameForms: {
        flag: "changeName",
        // 客户名称
        partyName: "",
        custName:"",
        // 证件类型
        certType: "",
        certTypeName: "",
        // 证件号码
        certNum: "",
        // 证件地址
        certAddr: "",

        photoName: "",
        // 证件照片url
        photoPath: "",
        // 行业类型
        industryTypeId: "",

        industryTypeName: "", //行业类型名称
        //
        custId: "",

        partyId: "",
        // 审核人
        auditor: "",
        auditId: "",
        statusCd: "", //进入改名改证件 用来判断 审核人是否显示的字段
      },
      selectInfo: [
        {
          flag: "control_type", //直管类型
          val: [],
        },
        {
          flag: "cert_type", //改名改证件直管类型
          val: [],
        },
      ],
      changeNameRules: {
        custName: [
          { required: true, message: "请输入客户名称", trigger: "blur" },
        ],

        certType: [
          {
            required: true,
            validator: validRules.gaoyj_checkIdCardSType,
            trigger: "change",
          },
        ],
        certNum: [
          {
            validator: validRules.gaoyj_checkIdCardNum,
            trigger: "blur",
          },
        ],
        certAddr: [
          {
            validator: validRules.gaoyj_checkedCustCertAddr,
            trigger: "blur",
          },
        ],
        industryTypeName: [
          { required: true, message: "请选择行业类型", trigger: "change" },
        ],
        auditor: [
          { required: true, message: "审核人不能为空", trigger: "blur" },
        ],
        photoPath: [
          { validator: validRules.gaoyj_checkedPhotoPath, trigger: "blur" },
        ],
      },
      industryTypeNameIsShow: false,
      DicTableIsShow: false,
      // 改名改证件照片数组
      changeNameList: [],
      onComplianceVisible: false,
      alertTitle: "",
      titleMsg: "",
      titleMsgIsshow: false,
      isDisabled:false,//合规认证判断值
      nonComplianceviewTableColumns: [
        { field: "jtCustName", title: "客户名称" },
        {
          field: "orgUscc",
          title: "统一社会信用代码",
          width: 200,
          showOverflow: true,
        },
        { field: "certNum", title: "组织机构代码" },
        { field: "registerAddr", title: "注册地址", width: 400 },
        { slotName: "opt", title: "操作" },
      ],
      // 合规性不通过的逻辑列表
      nonComplianceviewTableData: [],

      onComplianceVisible: false,
      // 改名改证件  -选择党政军-行业类型
      changeNameindustryTableData: [],
      changeNameindustryTableColumn: [
        { field: "industryTypeName", title: "行类类型名称", treeNode: "true" },
      ],
      changeNameindustryTableTreeConfig: {
        children: "children",
        iconOpen: "el-icon-remove",
        changeNameiconClose: "el-icon-circle-plus",
        accordion: true, // 一层只允许展开一个节点
        expandAll: false, // 默认是否全部展开
      },
      // 审核人-表单
      changeNameAuditIdForm: {
        staffCode: "", //审核人编码
        staffName: "", //审核人名称
        staffNameChoose: "",
        staffCodeId: "", //选择审核人编码存放变量
      },
      auditIdColumns: [
        {
          field: "STAFF_CODE",
          title: "员工编码",
          fixed: "left",
          showOverflow: true,
          width: 100,
        },
        {
          field: "STAFF_NAME",
          title: "员工姓名",
          width: 200,
          fixed: "left",
          showOverflow: true,
        },
        { field: "MOBILE_PHONE", title: "员工联系方式", width: 200 },
        { field: "ORG_NAME", title: "组织名称", width: 200 },
        { field: "DEPARTMENT_NAME", title: "部门名称", width: 200 },
      ],
      auditIdTableData: [],
      auditIdTableLoading: false,
      auditIdTablePage: {
        pageIndex: 1,
        pageSize: 5,
        rowCount: 0,
        pageCount: 0,
      },
    };
  },
  components: {
    DicCustomerSelect,
    DicTable,
  },
  computed: {
    ...mapState("user", ["user"]),
  },
  mounted() {
    this.initValue();
    this.initChangeName(this.data.partyId, this.data.custId);
    this.getCustCommon(this.data.custId);
  },
  methods: {
    // 直管类型初始化
    async initValue() {
      let response = "";
      this.selectInfo.forEach(async (item, index) => {
        response = await CustomerInfoManageServer.initValue({
          flag: item.flag,
        });
        if (response.code == 200) {
          this.selectInfo[index].val = response.meta.customers;
        } else {
          this.$notify.error({
            title: "错误",
            message: response.msg,
          });
        }
      });
    },
    async getCustCommon(val){
      let params = {
        params: "custId:" + val,
        sqlId: "2021080901",
      };
      let result = await CustomerInfoManageServer.getCustCommon(params);
      if(result.code == 200){
        this.changeNameForms.custName = result.meta.custName;
      }
    },

    closeDrawer() {
      this.$emit("closeDrawer");
    },
    cancelHandel() {
      this.$emit("cancelHandel");
      this.$refs.ChangeNameFormRef.clearValidate();
    },
    // 判断值是否存在
    isNull(val) {
      if (
        val == "NaN" ||
        val == "null" ||
        val == "undefined" ||
        val == undefined
      ) {
        return (val = "");
      } else {
        return val;
      }
    },
    //  改名改证件初始化方法
    async initChangeName(partyId, custId) {
      this.changeNameForms.custId = custId;
      this.changeNameForms.partyId = partyId;
      let params = {
        partyId,
        custId,
      };

      let result = await CustomerInfoManageServer.initGetPartyNews(params);
      let res = result.meta;
      this.changeNameForms.partyName = this.isNull(res.party.partyName);
      this.changeNameForms.certType = this.isNull(res.party.partyCert.certType);
      this.changeNameForms.certTypeName = this.isNull(
        res.party.partyCert.certTypeName
      );
      this.changeNameForms.certNum = this.isNull(res.party.partyCert.certNum);
      this.changeNameForms.photoName = this.isNull(
        res.party.partyCert.photoName
      );
      this.changeNameForms.photoPath = this.isNull(
        res.party.partyCert.photoPath
      );
      // 证件地址
      this.changeNameForms.certAddr = this.isNull(res.party.partyCert.certAddr);
      // 行业类型
      this.changeNameForms.industryTypeId = this.isNull(
        res.party.partyOrg.industryTypeId
      );

      this.changeNameForms.extPartyId = this.isNull(res.party.extPartyId);

      if (
        this.changeNameForms.certType == "7" ||
        this.changeNameForms.certType == "72"
      ) {
        this.industryTypeNameIsShow = true;
        if (
          this.data.statusCd == "1100" &&
          this.user.orgId != "1944640"
        ) {
          this.isAuditIdShow = true;
        }
      } else {
        this.industryTypeNameIsShow = false;
        this.isAuditIdShow = false;
      }
      if (
        this.isNull(this.changeNameForms.photoPath) &&
        this.isNull(this.changeNameForms.photoName)
      ) {
        this.changeNamephoData.oldPhotoPath = this.changeNameForms.photoPath;
        this.getCustPhoto(
          this.changeNameForms.photoName,
          this.changeNameForms.photoPath
        );
      } else {
        this.changeNameList = [];
      }
    },

    //客户列表-- 改名改证件-上传证件照片
    changeNameChange(file, fileList) {
      var returnArr;
      if (fileList.length > 1) {
        returnArr == fileList.shift();
        
      }
      this.changeNameList = fileList;
    },
    changeNamePreview(file) {
      this.changeNameDialogImageUrl = file.url;
      this.changeNameDialogVisible = true;
    },
    changeNameSuccess(res, file) {
      var _this = this;
      this.changeNamephoData.oldPhotoPath = res.meta.photoPath;
      if (res.code == 200) {
        this.$notify({
          title: "成功",
          message: "图片上传成功",
          type: "success",
        });
      }
    },
    changeNameUpload(file) {
      this.changeNamephoData.partyId = this.changeNameForms.partyId;
      const isJPG = true;
      const isLt10M = file.size / 1024 / 1024 < 10;
      if (!isJPG) {
        this.$message.error("上传头像图片只能是 JPG png格式!");
      }
      if (!isLt10M) {
        this.$message.error("上传图片大小不能超过 10MB!");
      }
      return isJPG && isLt10M;
    },
    // 改名改证件-疑似信息回显-选择
    changeRow(row) {
      this.changeNameForms.custName = row.jtCustName;
      if (row.orgUscc) {
        this.changeNameForms.certNum = row.orgUscc;
        // 赋值证件类型
        this.changeNameForms.certType = "49";
      } else {
        this.changeNameForms.certNum = row.certNum;
        this.changeNameForms.certType = "15";
      }
      this.onComplianceVisible = false;
    },

    // 附件上传-证件照回显
    async getCustPhoto(photoName, photoPath) {
      
      let params = {
        photoPath,
      };
      const response = await CustomerInfoManageServer.getCustPhoto(params);
      this.changeNameList = [
        {
          name: photoName,
          url: response.meta.base64,
        },
      ];
    },
    // 改名改证件保存方法-合规性认证保存方法
    async submitChangeName() {
      let params = {
        partyName: this.changeNameForms.custName,
        certType: this.changeNameForms.certType,
        certNum: this.changeNameForms.certNum,
        photoName: this.changeNameForms.photoName,
        photoPath: this.changeNameForms.photoPath,
        staffId: this.user.staffId,
        staffName: this.user.staffName,
        orgId:this.user.orgId,
        regionType:this.user.regionType,
        regionCode:this.user.regionCode,
        industryTypeId: this.changeNameForms.industryTypeId,
        certAddr: this.changeNameForms.certAddr,
        custId: this.changeNameForms.custId,
        partyId: this.changeNameForms.partyId,
        auditor: this.changeNameForms.auditId,
        extPartyId: this.changeNameForms.extPartyId,
        oldPartyCode:this.data.oldPartyCode,
        regionId:this.data.regionId,
      };
      let loadingInstance = this.$loading({ fullscreen: true });
      let result = await CustomerInfoManageServer.changeNameSave(params);
      loadingInstance.close();
      let res = result.meta;
      if (res.resultCode == "0") {
        this.$confirm("认证成功", "提示", {
          confirmButtonText: "确定",
          type: "success",
          center: true,
          showCancelButton: false,
        }).then(() => {
          this.$emit("subitForm");
        });
        return
      }else if(res.resultCode && res.resultCode != "0"){
        this.$message({
          showClose: true,
          message: res.resultMsg,
          type: 'error'
        });
        return
      }
      if (res.step == "1") {
        this.$confirm("保存成功", "提示", {
          confirmButtonText: "确定",
          type: "success",
          center: true,
          showCancelButton: false,
        }).then(() => {
          this.$emit("subitForm");
        });
      } else if (res.step == "2") {
        this.isDisabled = true
        if (res.ruleCode == "-1") {
          this.$confirm("合规性验证异常，暂时无法获取身份证信息", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          });
        } else {
          this.onComplianceVisible = true;
          if (res.ruleCode == "10002") {
            this.alertTitle =
              "合规性验证不通过：组代无数据，请确认是否以下疑似客户:";
            this.titleMsg = "如非以上疑似客户请上传证件照片";
            this.titleMsgIsshow = true;
            this.DicTableIsShow = true;
          } else if (
            res.ruleCode == "10003" ||
            res.ruleCode == "10004" ||
            res.ruleCode == "10005"
          ) {
            this.alertTitle =
              "合规性验证不通过：客户名称不一致，正确客户信息如下：";
            this.titleMsg = "";
            this.titleMsgIsshow = false;
            this.DicTableIsShow = true;
          } else if (res.ruleCode == "10010" || res.ruleCode == "10011") {
            this.alertTitle =
              "合规性验证不通过：证件号码不一致，正确客户信息如下：";
            this.titleMsg = "";
            this.titleMsgIsshow = false;
            this.DicTableIsShow = true;
          } else {
            this.alertTitle = res.ruleMsg;
            this.titleMsg = "";
            this.titleMsgIsshow = false;
            this.DicTableIsShow = false;
          }
          this.nonComplianceviewTableData = result.meta.suspectedCust;
        }
      }
    },

    // 改名改证件点击保存
    submitChangeForm() {
      this.$refs.ChangeNameFormRef.validate((valid) => {
        if (valid) {
          this.isDisabled = false
          this.submitChangeName();
        } else {
          this.isDisabled = true
          return false;
        }
      });
    },
    //  改名改证件修改证件类型
    changeNameCustNumberTypeChange(val, name) {
      this.changeNameForms.certTypeName = name;
      this.changeNameForms.certType = val;
      this.$refs.ChangeNameFormRef.clearValidate("certNum");
      this.$refs.ChangeNameFormRef.clearValidate("photoPath");
      this.$refs.ChangeNameFormRef.clearValidate("photoName");
      if (
        this.changeNameForms.certType == "7" ||
        this.changeNameForms.certType == "72"
      ) {
        this.industryTypeNameIsShow = true;
        if (
          this.data.statusCd == "1100" &&
          this.user.orgId != "1944640"
        ) {
          this.isAuditIdShow = true;
        }
      } else {
        this.industryTypeNameIsShow = false;
        this.isAuditIdShow = false;
      }
    },
    // 改名改证件-党政军-行业类型
    async changeNameindustryCdAjax() {
      const response =
        await CustomerInfoManageServer.getIndustryTypeChangeNameTree();
      if (response.code == 200) {
        this.changeNameindustryTableData = response.meta;
      } else {
        this.$notify.error({
          title: "错误",
          message: response.msg,
        });
      }
    },
    //
    changeNameCellDBLClickEvent(data) {
      this.$refs.changeNameIndustyRef.drawer = false;
      this.changeNameForms.industryTypeId = data.row.industryTypeCode;
      // 获取行业类型的code
      this.changeNameForms.industryTypeName = data.row.industryTypeName;
    },
    //新建客户-审核人点击方法
    auditIdAjaxHandel(row) {
      this.auditIdTablePage.pageIndex = 1;
      this.auditIdTablePage.pageSize = 5;
      this.auditIdAjax();
    },
    subitForm() {
      this.isShow = false;
      this.$router.push("/custbaseinf");
    },
    // 审核人的ajax-初始化
    async auditIdAjax() {
      let params = {
        staffId: this.user.staffId,
        pageIndex: this.auditIdTablePage.pageIndex,
        pageSize: this.auditIdTablePage.pageSize,
        staffCode: this.changeNameAuditIdForm.staffCode,
        staffName: this.changeNameAuditIdForm.staffName,
      };
      let res = await CustomerInfoManageServer.getAuditorList(params);
      if (res.code == 200) {
        this.auditIdTableData = res.meta.customers || [];
        this.auditIdTablePage.rowCount = Number(res.meta.pageInfo.rowCount);
        this.auditIdTablePage.pageCount = Number(res.meta.pageInfo.pageCount);
      } else {
        this.$notify.error({
          title: "错误",
          message: response.msg,
        });
      }
    },

    // 新建客户-证件类型切换党政军-显示的审核人弹窗-点击行
    auditIdCurrentChangeEvent(val) {
      
      
      this.changeNameAuditIdForm.staffNameChoose =
        val.data[val.$rowIndex].STAFF_NAME;
      this.changeNameAuditIdForm.staffCodeId =
        val.data[val.$rowIndex].STAFF_ID;
    },
    // 新建客户-证件类型切换党政军-显示的审核人弹窗-分页
    auditIdHandlePageChange(val) {
      this.auditIdTablePage.pageIndex = val.currentPage;
      this.auditIdTablePage.pageSize = val.pageSize;
      this.auditIdAjax();
    },
    // 点击审核人弹窗-确定将审核人的id带过来
    sunmitAuditIdHandel() {
      this.changeNameForms.auditor = this.changeNameAuditIdForm.staffNameChoose;
      this.changeNameForms.auditId = this.changeNameAuditIdForm.staffCodeId;
      this.$refs.auditIdRef.drawer = false;
      this.$refs.ChangeNameFormRef.clearValidate('auditor');
    },
    // 审核人查询方法
    auditIdQuery() {
      this.auditIdTablePage.pageIndex = 1;
      this.auditIdTablePage.pageSize = 5;
      this.auditIdAjax();
    },
  },
};
</script>
<style lang="scss" scoped>
.m-title {
  margin-top: 20px;
  margin-bottom: 20px;
  color: #0052d9;
  font-size: 12px;
}
.m-title .icon {
  float: left;
  display: block;
  width: 4px;
  height: 12px;
  background: #f56f3c;
  margin-top: 2px;
  margin-right: 10px;
  font-size: 14px;
}
.el-drawer__header {
  display: none;
}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
.select-box {
  width: 100%;
}
.dialog-footer {
  text-align: center;
}
</style>
